package com.zr.enums;

import lombok.Getter;

@Getter
public enum CoreExceptionEnum {

    /**
     * 枚举项目的返回code和message  : 异常类型自行增删
     */
    /**
     * 业务异常400
     */
    SERVICE_EXCEPTION(400, "业务异常"),
    INVALID_FILE_TYPE(400, "无效的文件类型！"),
    INVALID_PARAM_ERROR(400, "无效的请求参数！"),
    DATA_TRANSFER_ERROR(400, "数据转换异常！"),
    INVALID_PHONE_NUMBER(400, "无效的手机号码"),
    INVALID_USERNAME_PASSWORD(400, "无效的用户名和密码！"),
    INSERT_OPERATIONS_FAIL(400, "批量新增失败！"),
    INSERT_OPERATION_FAIL(400, "批量新增失败！"),
    DATA_ALREADY_EXISTS(400,"员工已存在"),
    UNAUTHORIZED(400,"权限不足"),

    FILE_UPLOAD_ERROR(400,"上传失败"),
    FILE_SAVE_FILE(400,"文件信息保存失败"),
    REQUEST_DATA_ERROR(400,"读取httpServletRequest异常"),

    NOT_LOGIN_IN(403,"用户未登录"),
    /**
     * 系统异常
     */
    SYSTEM_EXCEPTION(500,"服务异常");

    private int code;
    private String message;
    CoreExceptionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}

